import cv2
image_path=r'1.png'
img=cv2.imread(image_path)
img=cv2.resize(img,(200,250))

time=1000
cv2.imshow('Original Image (BGR)',img)
cv2.waitKey(time)

img_rgb=cv2.cvtColor(img,cv2.COLOR_BGR2RGB)
cv2.imshow('RGB Image',img_rgb)
cv2.waitKey(time)

img_gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
cv2.imshow('Grayscale Image',img_gray)
cv2.waitKey(time)

img_hsv = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)
cv2.imshow('HSV Image',img_hsv)
cv2.waitKey(time)

img_ycrcb=cv2.cvtColor(img,cv2.COLOR_BGR2YCrCb)
cv2.imshow('YCrCb Image',img_ycrcb)
cv2.waitKey(time)

img_hls=cv2.cvtColor(img,cv2.COLOR_BGR2HLS)
cv2.imshow('HLS Image',img_hls)
cv2.waitKey(time)

img_xyz=cv2.cvtColor(img,cv2.COLOR_BGR2XYZ)
cv2.imshow('XYZ Image',img_xyz)
cv2.waitKey()
img_lab=cv2.cvtColor(img,cv2.COLOR_BGR2LAB)
cv2.imshow('LAB Image',img_lab)
cv2.waitKey()
img_yuz=cv2.cvtColor(img,cv2.COLOR_BGR2YUV)
cv2.imshow('YUZ Image',img_yuz)
cv2.waitKey()
cv2.waitKey()
cv2.destroyAllWindows()
